﻿using Foothill.Model;

namespace Foothill.Filter.Test.TestUtilities
{
    internal class SimpleAdIdComparer : System.Collections.IComparer
    {
        public int Compare(object x, object y)
        {
            if (x is ForSaleAd && y is ForSaleAd)
            {
                ForSaleAd ad1 = x as ForSaleAd;
                ForSaleAd ad2 = y as ForSaleAd;

                return ad1.AdId.CompareTo(ad2.AdId);
            }
            else
            {
                return -1;
            }
        }
    }
}
